package io.qar.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.qar.commons.dynamic.datasource.annotation.DataSource;
import io.qar.commons.mybatis.service.impl.CrudServiceImpl;
import io.qar.dao.OriFocT2001Dao;
import io.qar.dto.OriFocT2001DTO;
import io.qar.entity.OriFocT2001Entity;
import io.qar.service.OriFocT2001Service;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 航班动态原始表
 *
 * @author yyyyjinying 
 * @since 3.0 2023-10-25
 */
@Service
@DataSource("slave2")
public class OriFocT2001ServiceImpl implements OriFocT2001Service {

    @Autowired
    private OriFocT2001Dao oriFocT2001Dao;

    @Override
    public List<OriFocT2001Entity> getList(String beginDate, String endDate) {
        String startDateString = StrUtil.trim(beginDate) + " 00:00:00";
        String endDateString = StrUtil.trim(endDate) + " 00:00:00";
        Timestamp alarmStartTime = Timestamp.valueOf(startDateString);
        Timestamp alarmEndTime = Timestamp.valueOf(endDateString);
        List<OriFocT2001Entity> list = oriFocT2001Dao.getList(alarmStartTime, alarmEndTime);
        return list;
    }
}